package com.pharmacy.pharmacy.domain;


/**
 * 【】对象 order_item
 * 
 * @author 
 * @date 2025-05-08
 */
public class OrderItem 
{

    /** 主键，自增ID */
    private Long id;

    /** 所属订单ID */
    private Long orderId;

    /** 药品ID */
    private Long medicineId;

    /** 购买数量 */
    private Long quantity;

    /** 单价（单位：分） */
    private Long unitPrice;


    public OrderItem() {
    }

    public OrderItem(Long id, Long orderId, Long medicineId, Long quantity, Long unitPrice) {
        this.id = id;
        this.orderId = orderId;
        this.medicineId = medicineId;
        this.quantity = quantity;
        this.unitPrice = unitPrice;
    }

    /**
     * 获取
     * @return id
     */
    public Long getId() {
        return id;
    }

    /**
     * 设置
     * @param id
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 获取
     * @return orderId
     */
    public Long getOrderId() {
        return orderId;
    }

    /**
     * 设置
     * @param orderId
     */
    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    /**
     * 获取
     * @return medicineId
     */
    public Long getMedicineId() {
        return medicineId;
    }

    /**
     * 设置
     * @param medicineId
     */
    public void setMedicineId(Long medicineId) {
        this.medicineId = medicineId;
    }

    /**
     * 获取
     * @return quantity
     */
    public Long getQuantity() {
        return quantity;
    }

    /**
     * 设置
     * @param quantity
     */
    public void setQuantity(Long quantity) {
        this.quantity = quantity;
    }

    /**
     * 获取
     * @return unitPrice
     */
    public Long getUnitPrice() {
        return unitPrice;
    }

    /**
     * 设置
     * @param unitPrice
     */
    public void setUnitPrice(Long unitPrice) {
        this.unitPrice = unitPrice;
    }

    public String toString() {
        return "OrderItem{id = " + id + ", orderId = " + orderId + ", medicineId = " + medicineId + ", quantity = " + quantity + ", unitPrice = " + unitPrice + "}";
    }
}
